package pegparsertest;

import com.gooddies.wiring.Wiring;
import com.gui.MainFrame;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JPopupMenu;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class PegParserTest {

    private static void setWindowsLookAndFeel() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            JPopupMenu.setDefaultLightWeightPopupEnabled(false);
        } catch (Exception ex) {
            Logger.getLogger(PegParserTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public static void main(String[] args) {
        setWindowsLookAndFeel();
        Wiring.init()
                .addScanPackage("com.gui")
                .build();
        
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                MainFrame frame = (MainFrame) Wiring.get().getWiringComponent(MainFrame.class);
                frame.setVisible(true);
            }
        });
    }
}
